{% extends 'base.html' %}
{% load static %}
{% block title %}投票结果页{% endblock %}
{% block content %}
<h1>投票结果</h1>
<hr>
<h3>{{ question.question_text }}</h3>
<table class="table table-bordered table-striped table-hover">
    {% for choice in question.choice_set.all %}
        {% if forloop.counter|divisibleby:2 %}
            <tr class="warning">
        {% else %}
            <tr class="danger">
        {% endif %}
            <td>{{ choice.choice_text }}</td>
            <td>{{ choice.votes }}</td>
        </tr>
    {% endfor %}
</table>
{% endblock %}
